package jdk8;

/**
 * @author oldliu
 * @since 1.0
 */
public class MyLambda {
    public static void main(String[] args) {
        Shuxue s=(x,y)->{
          return x+y;
        };
        int res = s.operate(10, 30);
        System.out.println(res);

        Shuxue c=(x,y)->{
            return x*y;
        };
        int chengfa = c.operate(10, 20);
        System.out.println(chengfa);
       Thread t=new Thread(()->{
           for (int i = 0; i < 20; i++) {
               System.out.println(i);
           }
       });
       t.start();
    }
}
interface Shuxue{
    int operate(int a,int b);
}
